package com.kolaxy.mqdemo;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * <一句话功能描述><功能详细描述>
 *
 * @author zhourunjin
 * @version: [版本号，2018-09-14]
 * @see [相关类/方法]
 * @since [产品/模块版本]
 */
@Component
@RabbitListener(queues = "${mq.first.queue}")
public class MqReceiver {

    @Autowired
    private AmqpTemplate template;

    @RabbitHandler
    public void receive(String message){
        System.out.println(message);
    }

}
